<?php
  include 'connect_to_database.php';
  connectToDatabase();
  
  session_start();
  $USERNAME = $_SESSION['username'];
  $PASSWORD = $_SESSION['password'];
  $SQLUSER = mysql_query("SELECT * FROM Users WHERE Email=$USERNAME");

  while($row == mysql_fetch_array($SQLUSER))
  {
   if($PASSWORD == $SQLUSER['Password'])
   {
     $_SESSION['LoggedIn'] = true;
   }
   else
   {
     $_SESSION['LoggedIn'] = false;
   }
  }
  
  closeConnection();
  ?>
